home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
016a
/
fdate42a.zip
/
TIC.BAT
< prev
Wrap
DOS Batch File
|
1992-01-06
|
4KB
|
93 lines
@echo off
REM TicBAT points to the tickler batch file
set TicBAT=C:\TICKLER.BAT
set ticdat=
set ticmsg=
set tictmp=
if (%1)==() goto HELP
if (%2)==() goto LIST
:ADD
rem -------------------------------------------------------------
rem use a batch file to set ticdat, because it will display full error
rem message if bad date has been passed in via parm %1
rem -------------------------------------------------------------
Fdate /Ff /A%1 /Imm-dd-yy /Omm-dd-ccyy /P"@set ticdat=">junktemp.BAT
call junktemp.BAT
del junktemp.BAT
if errorlevel 1 goto endit
set tictmp=%0 %1
shift
set ticmsg=%1 %2 %3 %4 %5 %6 %7 %8 %9
for %%v in ( 1 2 3 4 5 6 7 8 9) do shift
set ticmsg=%ticmsg% %1 %2 %3 %4 %5 %6 %7 %8 %9
echo if (%%today%%)==(%ticdat%) echo %ticmsg%>>%TicBAT%
CLS
%tictmp%
goto endit
:HELP
echo ┌─────────────────────────────────────────────────────────────────────────────┐
echo │ TIC.BAT │
echo │─────────────────────────────────────────────────────────────────────────────│
echo │ FUNCTION: maintains and lists TICKLER.BAT an automated tickler file. │
echo │ If TICKLER.BAT does not exist, or has been erased, a new one │
echo │ will be created. │
echo │ │
echo │─────────────────────────────────────────────────────────────────────────────│
echo │ USAGE : TIC displays this HELP screen │
echo │─────────────────────────────────────────────────────────────────────────────│
echo │ USAGE : TIC T displays today's appointments │
echo │ USAGE : TIC TODAY displays today's appointments │
echo │─────────────────────────────────────────────────────────────────────────────│
echo │ USAGE : TIC mm/dd/yy displays appointments for date mm/dd/yy │
echo │ EXAMPLE : TIC 2/2/92 displays appointments for Feb 2, 1992 │
echo │ EXAMPLE : TIC 2/2/tt displays appointments for Feb 2 of this year │
echo │─────────────────────────────────────────────────────────────────────────────│
echo │ USAGE : TIC mm/dd/yy word1 .... word 18 adds a date mm/dd/yy and │
echo │ description to TICKLER.BAT │
echo │ EXAMPLE : TIC 2/2/92 Quality Improvement committee meeting @ 10 am │
echo │ EXAMPLE : TIC 2/2/tt Quality Improvement committee meeting @ 10 am │
echo └─────────────────────────────────────────────────────────────────────────────┘
goto endit
REM ==================================================================
:LIST
if not exist %TicBAT% goto endit
rem ------------- call a batch file to set TODAY evar ------------
Fdate /Ff /A%1 /Imm-dd-yy /Omm-dd-ccyy /P"@set today=">junktemp.BAT
call junktemp.BAT
del junktemp.BAT
rem --------------------------------------------------------------
: If you have GET, you can replace the previous lines with these.
: Remove the ":" from before the FDATE command and things should
: work fine. Use :, not REM to comment out lines that contain
: the DOS pipe symbol "|". Otherwise you may hang your machine.
rem -------- pipe Fdate output to GET to set TODAY evar ----------
: Fdate /Ff /A%1 /Imm-dd-yy /Omm-dd-ccyy | GET ZE /Vtoday >nul
rem --------------------------------------------------------------
if (%today%)==(ERROR) echo Invalid date parameter [%1] received by %0
if (%today%)==(ERROR) goto endit
echo ───────────────────────────────────────────────────────────────────────────────
FDATE /ff /A%today% /Imm-dd-ccyy /Od1 /P"APPOINTMENTS & THINGS TO DO: "
echo ───────────────────────────────────────────────────────────────────────────────
CALL %TicBAT%
:endit
set ticdat=
set ticmsg=
set TicBAT=